// pages/details1/details1.js
Page({
  data: {
    isLike: true,
    // banner
    imgUrls: ["https://res.lancome.com.cn/resources/2020/8/11/15971578465045772_920X920.jpg?version=20200821173443363",
    "https://res.lancome.com.cn/resources/2020/8/11/15971578474625338_920X920.jpg?version=20200821173443363",
    "https://res.lancome.com.cn/resources/2020/8/26/15984176535701498_920X920.jpg?version=20200821173443363",
    ],
    indicatorDots: true, //是否显示面板指示点
    autoplay: true, //是否自动切换
    interval: 3000, //自动切换时间间隔,3s
    duration: 1000, //  滑动动画时长1s

    // 商品详情介绍
    detailImg: [
     
    ],
  },
  //预览图片
  previewImage: function (e) {
    var current = e.target.dataset.src;

    wx.previewImage({
      current: current, // 当前显示图片的http链接  
      urls: this.data.imgUrls // 需要预览的图片http链接列表  
    })
  },
  goCart(){
    wx.switchTab({
      url: "/pages/cart/cart"
    })
  },
  immeBuy() {
    wx.showToast({
      title: '购买成功',
      icon: 'succ.png',
      duration: 2000
    });
  },
})